package com.fortune.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.fortune.dto.in.mStoreTrans.MStoreTransAListDto;
import com.fortune.dto.in.mStoreTrans.MStoreTransAddDetailDto;
import com.fortune.dto.in.mStoreTrans.MStoreTransAddDto;
import com.fortune.dto.in.mStoreTrans.MStoreTransEditDto;
import com.fortune.entity.MProductStockDetailInfo;
import com.fortune.entity.MUserInfo;
import com.fortune.vo.mStoreTrans.MStoreTransInfo;
import com.fortune.vo.mStoreTrans.MStoreTransInfoDetail;
import com.fortune.vo.mStoreTrans.MstoreTransDetail;

public interface MstoreTransDao {
	
	List<MStoreTransInfo> list(@Param("mUserInfo")MUserInfo mUserInfo, @Param("listDto")MStoreTransAListDto listDto);
	
	int count(@Param("mUserInfo")MUserInfo mUserInfo, @Param("listDto")MStoreTransAListDto listDto);
	
	MstoreTransDetail detail(@Param("mUserInfo")MUserInfo mUserInfo,@Param("id")String id);
	
	int add(@Param("id")String id,@Param("mUserInfo")MUserInfo mUserInfo,@Param("addDto")MStoreTransAddDto addDto);
	
	int addDetail(@Param("id")String id,@Param("mUserInfo")MUserInfo mUserInfo,@Param("addDetailDto")MStoreTransAddDetailDto addDetailDto);
	
	int edit(@Param("mUserInfo")MUserInfo mUserInfo,@Param("editDto")MStoreTransEditDto editDto);
	
	int deleteDetail(@Param("mUserInfo")MUserInfo mUserInfo,@Param("editDto")MStoreTransEditDto editDto);
	
	int delete(@Param("mUserInfo")MUserInfo mUserInfo,@Param("id")String id);
	
	int outConfirm(@Param("mUserInfo")MUserInfo mUserInfo,@Param("id")String id);
	
	int inConfirm(@Param("mUserInfo")MUserInfo mUserInfo,@Param("id")String id);
	
	MProductStockDetailInfo mProductStockDetailInfo(@Param("mUserInfo")MUserInfo mUserInfo, String storeId,String mpid);
	
	int productOut(@Param("num")Integer num,@Param("mId")String mId,@Param("outStore")String outStore,@Param("id")String id,@Param("detail")MStoreTransInfoDetail mstoreTransInfoDetail);

	Integer findRemainNum(@Param("mId")String mId,@Param("allStore")String allStore,@Param("mpid")String mpid);

	int productIn(@Param("num")Integer num,@Param("mId")String mId,@Param("inStore")String inStore,@Param("id")String id,@Param("detail")MStoreTransInfoDetail mstoreTransInfoDetail);
}
